﻿@{
    ViewBag.Title = "TimKiem";
    Layout = "~/Views/MasterPage/Main.cshtml";
}

<h4>Danh sách sản phẩm</h4>
<table class="order-list @ViewBag.EmptyState">
    <caption>
        <p>Kết quả tìm kiếm cho: @ViewBag.Keyword</p>
    </caption>
	<colgroup>
		<col width="5%">
		<col width="15%">
		<col width="10%">
		<col width="20%">
		<col width="*">
	</colgroup>
	<thead>
		<tr> 
			<th>STT</th>
			<th>Tên sản phẩm</th>
			<th>Giá</th>
			<th>Hình ảnh</th>
            <th>Chi tiết</th>
		</tr>
	</thead>
	<tbody>
    @{
        int i = 1;
        foreach (var sanPham in ViewBag.SanPham)
        {
            <tr data-id="@sanPham.id" class="i-row">
                <td>@i</td>
                <td>@sanPham.tenSanPham</td>
                <td>@sanPham.giaSanPham</td>
                <td><img src="@sanPham.image"/></td>
                <td>@sanPham.thongTinChiTiet</td>
            </tr>
            i = i + 1;
        }
    }
        <tr class="error-message">
		    <td colspan="6">Không tìm thấy sản phẩm nào</td>
		</tr>
    </tbody>
</table>